package fr.p10.miage.shapes.model;

public class Point extends Shape2D {
	private int x;
	private int y;

	public Point(int x, int y) {
		this.x = x;
		this.y = y;
	}

	public boolean isOrigin() {
		if ((this.x == 0) && (this.y == 0))
			return true;
		else
			return false;
	}

	public double distance(Point p) {
		return (Math.sqrt(Math.pow((this.x - p.x), 2)
				+ Math.pow((this.y - p.y), 2)));
	}

	public void translate(int dx, int dy) {
		this.x = dx;
		this.y = dy;
	}

	@Override
	public double perimeter() {
		return 0;
	}

	@Override
	public String toString() {
		return "Point: x=" + x + ", y=";
	}

	@Override
	public double surface() {
		return 0;
	}

}
